//
//  VidViewController.swift
//  TC_V1
//
//  Created by Casper Ng on 18/6/17.
//  Copyright © 2017 Casper Ng. All rights reserved.
//

import UIKit
import AVKit
import AVFoundation

class VidViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        let path = Bundle.main.path(forResource: "WeChatSight1_1", ofType: "mp4")
        let player = AVPlayer(url: URL(fileURLWithPath: path!))
        let playerController = AVPlayerViewController()
        playerController.player = player
        
        self.addChildViewController(playerController)
        
        self.view.addSubview(playerController.view)
        playerController.view.frame = self.view.frame
        
        player.play()
        }
}
